package com.example.communist_app_api.service;

import com.example.communist_app_api.db.dto.OrganizationDTO;
import com.example.communist_app_api.db.pojoDto.Organization;
import com.example.communist_app_api.db.pojoDto.OrganizationalStructureDTO;
import com.github.pagehelper.PageInfo;

import java.util.List;

public interface OrganizationService {
    Integer getOrganizationIdByOrganizationName(String organizationName);

    Organization getOrganizationByOrganizationName(String organizationName);

    Organization getOrganizationByOrganizationId(Integer id);

    List<OrganizationDTO> getAllCommunist(String organizationName);

    List<OrganizationDTO> findOrganizationName(String organizationName);

    Organization getParentIdIsZero();

    Boolean createNewPartyCommittee(Organization createOrganization);

    Boolean createGeneralPartyBranch(Organization createOrganization);

    Boolean createPartyBranch(Organization createOrganization);

    PageInfo<OrganizationalStructureDTO> selectAllOrganization(Organization organization, Integer pageNum, Integer pageSize, Integer userId);

    void assignSecretaryOfTheGeneralBranch(Integer userIdBySecretaryOfTheGeneralBranch, Integer userId,Integer organizationId);

    void assignBranchSecretary(Integer userIdBySelect, Integer userIdByWebToken,Integer organization);

    void updateOrganizationMessage(Organization organization, Integer userIdByWebToken);

    void deletedPartyBranch(Integer organizationId, Integer userIdByWebToken);

    String getOrganizationLevelById(Integer id);
}
